﻿// SwaggerSettingsOptions.cs
// Copyright (c) 2022 chenchao
// Email:cc@on8.top

using Swashbuckle.AspNetCore.SwaggerUI;
using System;
using System.Collections.Generic;
using System.Text;

namespace OnWork.Tools.Swagger
{
    /// <summary>
    /// Swagger配置内容
    /// </summary>
    public class SwaggerSettingsOptions
    {
        public const string SwaggerSettings = "SwaggerSettings";

        /// <summary>
        /// 文档标题
        /// </summary>
        public string DocumentTitle { get; set; } = "DefaltDocumentTitle";

        /// <summary>
        /// 默认分组名
        /// </summary>
        public string DefaultGroupName { get; set; } = "Default";

        /// <summary>
        /// 配置规范化文档地址 默认 swagger
        /// </summary>
        public string RoutePrefix { get; set; }
        
        /// <summary>
        /// 是否启用
        /// </summary>
        public bool Enable { get; set; } = true;

        /// <summary>
        /// 分组信息
        /// </summary>
        public List<OpenApiSettings> GroupOpenApiInfos { get; set; }

        /// <summary>
        /// 文档展开设置
        /// </summary>
        public DocExpansion? DocExpansionState { get; set; }
        /// <summary>
        /// 配置文件对象 名称 当前目录的xml文件
        /// </summary>
        public List<string> XmlComments { get;  set; }
    }
}
